package com.xmtlxx.wms.mapper;

import com.xmtlxx.common.annotation.DataColumn;
import com.xmtlxx.common.annotation.DataPermission;
import com.xmtlxx.common.core.mapper.BaseMapperPlus;
import com.xmtlxx.wms.domain.CabinetGroup;
import com.xmtlxx.wms.domain.bo.CabinetGroupBo;
import com.xmtlxx.wms.domain.vo.CabinetGroupVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 智能柜Mapper接口
 *
 * @author xmtlxx
 * @date 2022-12-15
 */
public interface CabinetGroupMapper extends BaseMapperPlus<CabinetGroupMapper, CabinetGroup, CabinetGroupVo> {
    /**
     * 根据条件分页查询智能柜
     *
     * @param cabinetGroup 智能柜
     * @return Page CabinetGroup
     */
    @DataPermission({
        @DataColumn(key = "tenantName", value = "c.create_by"),
        @DataColumn(key = "deptName", value = "c.dept_id"),
        @DataColumn(key = "userName", value = "c.create_by")
    })
    Page<CabinetGroupVo> selectPageCabinetGroupList(@Param("page") Page<CabinetGroup> page,@Param("cabinetGroup") CabinetGroupBo cabinetGroup);

    /**
     * 查询智能柜列表
     *
     * @param cabinetGroup 智能柜
     * @return 智能柜集合
     */
    @DataPermission({
        @DataColumn(key = "tenantName", value = "c.create_by"),
        @DataColumn(key = "deptName", value = "c.dept_id"),
        @DataColumn(key = "userName", value = "c.create_by")
    })
    List<CabinetGroupVo> selectCabinetGroupList(@Param("cabinetGroup") CabinetGroupBo cabinetGroup);

    CabinetGroupVo selectCabinetGroupVoByID(String id);
}
